﻿// Type: System.Windows.Controls.HeaderedContentControl
// Assembly: PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\PresentationFramework.dll

using System.Windows.Controls;
using System.ComponentModel;
using System.Windows;

namespace MixModes.Phone.Synergy.Controls
{
    /// <summary>
    /// Headered content control
    /// </summary>
    public class HeaderedContentControl : ContentControl
    {
        /// <summary>
        /// Header property
        /// </summary>
        public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register("Header", 
                                                                                               typeof(object), 
                                                                                               typeof(HeaderedContentControl), 
                                                                                               new PropertyMetadata(null));

        /// <summary>
        /// Header template property
        /// </summary>
        public static readonly DependencyProperty HeaderTemplateProperty = DependencyProperty.Register("HeaderTemplate", 
                                                                                                        typeof(DataTemplate), 
                                                                                                        typeof(HeaderedContentControl), 
                                                                                                        new PropertyMetadata(null));

        /// <summary>
        /// Gets or sets the header.
        /// </summary>
        /// <value>
        /// The header.
        /// </value>
        [Category("Content")]
        public object Header
        {
            get
            {
                return GetValue(HeaderProperty);
            }
            set
            {
                SetValue(HeaderProperty, value);
            }
        }

        /// <summary>
        /// Gets or sets the header template.
        /// </summary>
        /// <value>
        /// The header template.
        /// </value>
        [Category("Content")]
        public DataTemplate HeaderTemplate
        {
            get
            {
                return (DataTemplate)GetValue(HeaderTemplateProperty);
            }
            set
            {
                SetValue(HeaderTemplateProperty, value);
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="HeaderedContentControl"/> class.
        /// </summary>
        public HeaderedContentControl()
        {
            DefaultStyleKey = typeof (HeaderedContentControl);
        }
    }
}
